//
//  SNReturnGoodsRepetitiousModel.m
//  app
//
//  Created by 王少宁 on 15/5/21.
//  Copyright (c) 2015年 hdaren. All rights reserved.
//

#import "SNReturnGoodsRepetitiousModel.h"

@implementation SNReturnGoodsRepetitiousModel

- (instancetype)initwithDict:(NSDictionary *)dict
{
    if ([super init]) {
        _sn = dict[@"orderInfo"][@"sn"];
        _isReturns = [dict[@"list"] firstObject][@"isReturns"];
        _ostatus = dict[@"orderInfo"][@"ostatus"];
        _createTime = [XCommon dateWithDateline:dict[@"orderInfo"][@"createTime"]];
        _receiver_name = dict[@"orderInfo"][@"receiver_name"];
        
        NSMutableArray * mutableArray = [[NSMutableArray alloc] init];
        for (NSDictionary * dic in dict[@"list"]) {;
            SNReturnGoodsAskAndRespondModel * model = [SNReturnGoodsAskAndRespondModel modelWithDict:dic];
            [mutableArray addObject:model];
        }
        _askAndRespondArray = mutableArray;
    }
    return self;
}

+ (instancetype)modelWithDict:(NSDictionary *)dict
{
    return [[self alloc] initwithDict:dict];
}

@end
